package com.hmall.order.task;

import com.hmall.order.service.impl.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author Mr_Su
 * @version v1.0
 * @date 2022/6/23 14:27
 * @desciption
 */
@Component
public class DelUnPayOrder {

    @Autowired
    private OrderService orderService;

    @Scheduled(cron = "0 * * * * ?")
    public void closeOrder(){
        orderService.closeTimeoutOrder();
    }
}
